Represents one of the possible values.
Optional implementation that allows holding null values.
Converts the given value to a Result, that stores a NullPointerException when the value is null.
null
Transforms the value with the ifPresent function if it's present, or the one provided by ifEmpty otherwise.
Returns the value if it's present, or default otherwise.
Returns the value if it's present, or the one provided by the action otherwise.
Executes the provided action if the value is absent.
Executes the provided action if the value is present.
Transforms the value with the provided action if it's present.
Transforms the result exception if it's a failure, otherwise returns itself.
If the result is successful, replaces it with the value returned by the transform operation.